package com.example.myapplication;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import androidx.annotation.Nullable;

public class PersonDBOpenHelper extends SQLiteOpenHelper{

    public PersonDBOpenHelper(@Nullable Context context) {
        //创建数据库
        super(context, "person.db", null, 1);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
           db.execSQL("create table info(_id integer primary key autoincrement,"+"name varchar(20))");
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int i, int j) {

    }
}
